﻿using System.ComponentModel.DataAnnotations;
using AllIsWell.Tests.TestData;
using NUnit.Framework;

namespace AllIsWell.Core.Tests.Models
{
    [TestFixture]
    class WhatTests : ModelTests
    {
        [Test]
        [ExpectedException(typeof(ValidationException), ExpectedMessage = "Question is required")]
        public void QuestionIsRequired()
        {
            var what = WhatSeed.GetWhat(1, 1);
            what.Question = "";

            ValidateModel(what);
        }

        [Test]
        [ExpectedException(typeof(ValidationException), ExpectedMessage = "Destiny is required")]
        public void DestinyIsRequired()
        {
            var what = WhatSeed.GetWhat(1, 1);
            what.Destiny = null;

            ValidateModel(what);
        }
    }
}
